<template>
	<view class="page-content">
		<view class="flex-center">
			<view class="status-box" :style="{'background': bgColor}">
				{{info.status}}
			</view>
			
		</view>
		<view v-for="(item,index) in info.list" :key="index" class="flex-between" style="font-size: 14px;">
			<view class="black-word">
				{{item.name}}
			</view>
			<view class="black-word" :class="index < 2 ? 'red-word' : ''">
			{{index < 2?'￥':''}}{{item.value}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					status: '',
					list: [{
							name: '提现金额',
							value: ''
						},
						{
							name: '扣除手续费',
							value: ''
						},
						{
							name: '提现至',
							value: ''
						},
						{
							name: '流水编号',
							value: ''
						},
						{
							name: '操作时间',
							value: ''
						},
						{
							name: '操作人',
							value: ''
						},
						{
							name: '状态',
							value: ''
						},
					]
				},
				bgColor: '#FF8D1A'

			}
		},
		onLoad(option) {
			let info = JSON.parse(option.infoJson)
			switch (info.status) {
				case '待审核':
					this.bgColor = '#FF8D1A'
					break;
				case '已通过':
					this.bgColor = '#159E4C'

					break;
				default:
					this.bgColor = '#E61010'

					break;
			}
			this.info.status=info.status
			this.info.list[0].value = info.withdrawal_amount
			this.info.list[1].value = info.service
			this.info.list[2].value = info.withdrawal_place
			this.info.list[3].value = info.ticket_number
			this.info.list[4].value = info.open_time
			this.info.list[5].value = info.open_people
			this.info.list[5].value = info.status

		}
		
	}
</script>

<style lang='scss' scoped>
	.page-content{
		padding: 30px 20px;
	}
	.status-box {
		font-size: 16px;
		padding: 10px 20px;
		color: #fff;
		margin-bottom: 30px;
	}

	.black-word {
		margin-bottom: 5px;
	}

	.red-word {
		color: #E61010;
		margin-bottom: 3px;
	}
</style>